#include "mainwindow.h"

MainWindow::MainWindow(void) :
	m_btn(new Button()),
	m_combo(new ComboBox())
{
	m_btn->click = EventHandlerPtr(new EventHandler(*this, *m_btn.get(), &my_click));
	m_combo->select_changed = EventHandlerPtr(new EventHandler(*this, *m_btn.get(), &my_select));

	//m_btn->click->invoke(nullptr);
}


MainWindow::~MainWindow(void)
{
}

void my_click(Control& parent, Control& sender, void* args)
{
	Window& me = static_cast<Window&>(parent);
	
	//me.m_btn.release();
}

void my_select(Control& parent, Control& sender, void* args)
{
	Window& me = static_cast<Window&>(parent);
	
	//me.m_btn.release();
}
